<?php
// Make sure _PATH_ is defined, otherwise when we pull in the config
// file it will have no idea where to find our directories
if (!defined("_PATH_")) {define("_PATH_",dirname(__FILE__));}

// Constants Files
require_once(_PATH_.DIRECTORY_SEPARATOR."config".DIRECTORY_SEPARATOR."const.php");

// Autoload
require_once _CORE_PATH_."includes".DIRECTORY_SEPARATOR."classes".DIRECTORY_SEPARATOR."Fox.php";
Fox::instance()->initialize();
Fox::instance()->register('Custom', Fox::MODE_NAMESPACE);
// Bundles
Fox::instance()->bundles()->register(_CORE_PATH_."bundles/Core");
Fox::instance()->bundles()->register(_CORE_PATH_."bundles/Documents");
Fox::instance()->bundles()->register(_CORE_PATH_."bundles/Contact");
Fox::instance()->bundles()->register(_CORE_PATH_."bundles/Sales");
Fox::instance()->bundles()->register(_SHAMA_PATH_."bundles/Shama");
// Ressources
// Used ressources
use Fox\Ressources\Collection, Fox\Ressources\Script, Fox\Ressources\Style;
Fox\Ressources::instance()->register(
	new Style(_CORE_ASSETS_."css/smoothness/jquery-ui-1.8.22.custom.css"),
	new Style(_CORE_ASSETS_."css/bootstrap.min.css"),
	new Style(_CORE_ASSETS_.'css/standard.css'),
	new Style(_CORE_ASSETS_.'css/grid.css'),
	new Style(_CORE_ASSETS_.'css/buttons.css'),
	new Style(_ASSETS_.'css/style.css'),
	new Script(_CORE_JAVAS_."msg-<langu>.js"),
	// Javascript Custom
	new Collection('jquery',array(
		'jquery.js',
		'jquery-metadata.js',
		'jquery.hashtable-2.1.js',
		'jquery-ui-1.8.22.custom.min.js',
		'jquery.numberformatter-1.2.1.min.js',
		'jquery.tipTip.minified.js',
		'jquery.cookie.js',
		),_CORE_ASSETS_."js/jquery/min/",array(Collection::PARAM_CACHE => true)),
	new Script(_CORE_ASSETS_."js/bootstrap.min.js"),
	// Fox Collection
	new Collection('fox',array(
		'jquery-fox.js',
		'fox-grid.js',
		'fox/ui/grid.js',
		'fox-html.js',
		'fox-site.js',
		'fox-superTables.js',
		'fox-table.js',
		'fox.js',
		'fox-fileuploader.js',
		'init.js',
		),_CORE_JAVAS_,array(Collection::PARAM_CACHE => false)),
	new Script(_ASSETS_.'js/custom.js')
);
date_default_timezone_set("Africa/Casablanca");
set_time_limit(500);
ini_set('default_socket_timeout', 600);
ini_set('gc_maxlifetime', 18000);// 5 hours